import { useImmerStore } from "@/store/immer/index";
import { Button } from "antd";
export default function ImmerDemo() {
  const { grounp, changeGroup, changeGroupOne } = useImmerStore();

  return (
    <div>
      <h1>ImmerDemo</h1>
      <div>{JSON.stringify(grounp)}</div>
      <div>{grounp.one}</div>

      <Button
        onClick={() => changeGroup({ one: "one111", two: "已经不重要了" })}
      >
        设置
      </Button>
      <Button onClick={() => changeGroupOne("1")}>设置one</Button>
    </div>
  );
}
